package composant;

import java.sql.SQLException;
import java.util.ArrayList;

import controleur.DataBase;
	//	Singleton

public class Station {
	private static Station instance;
	private String nom, localisation, placesMax;
	private int placesDispo;
	
	private ArrayList<Velo> velos;
	
	public static Station getInstance ()
	{
		if (null == instance) { // Premier appel
            try {
				instance = DataBase.getInstance().rechercheInfoStation(constantesFonctionnelles.ID_STATION);
			} catch (InstantiationException | IllegalAccessException
					| ClassNotFoundException | SQLException e) {
				e.printStackTrace();
			}
        }
        return instance;
	}
	
	public Station(String nom, String localisation, String placesMax) {
		super();
		this.nom = nom;
		this.localisation = localisation;
		this.placesMax = placesMax;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getLocalisation() {
		return localisation;
	}

	public void setLocalisation(String localisation) {
		this.localisation = localisation;
	}

	public String getPlacesMax() {
		return placesMax;
	}

	public void setPlacesMax(String placesMax) {
		this.placesMax = placesMax;
	}

	public ArrayList<Velo> getVelos() {
		return velos;
	}

	public void setVelos(ArrayList<Velo> velos) {
		this.velos = velos;
	}
	

	public int getPlacesDispo() {
		return placesDispo;
	}

	public void setPlacesDispo(int i) {
		this.placesDispo = i;
	}

}
